<!doctype html>
<html lang="{idioma_js}">
    <head>
        <title>CMS 2.0+ | {titulo} | Link Nacional</title>
        {include_header_view}
        <script>
            $(window).load(function(){
                $("[rel$='fancybox']").fancybox({
                    'transitionIn'	:	'elastic',
                    'transitionOut'	:	'elastic',
                    'speedIn'		:	600, 
                    'speedOut'		:	200, 
                    'overlayShow'	:	true,
                    'type'              :       'iframe',
                    'width'             :       '90%',
                    'height'             :       '90%'
                }); 
                
                
                $(".datatable td button").click(function(a){
                    a.preventDefault();
                    var obj = this;
                    var id = $(this).attr('id');
                    //var tipo = $(this).attr('tipo');
                    //var value = $(this).attr('value');
                    $.ajax({
                        //url: base_cms+"contato/status",
                        url: base_cms+"{link_contato_status}",
                        type: "POST",
                        data: {
                            'id' : id
                        },
                        dataType: "json",
                        beforeSend: function(){
                            $(obj).addClass('load');
                        },
                        success: function(data) {
                            if(data.cod == 999){
                                $(obj).attr('class',data.lida_icon);
                            } 
                            $(obj).removeClass('load');
                            $.msg(data.msg,{header:data.header,live:10000});
                        }
                    });
                });


            });
        </script>
    </head>
    <body>
        {include_body_header_view}
        {include_body_menu_left_view}
        <section id="content">
            <div class="g12">
                <h1>{lang_titulo}</h1>
                <table class="datatable">
                    <thead>
                        <tr>
                            <th>{lang_data}</th><th>&nbsp;&nbsp;{lang_nome}&nbsp;&nbsp;</th><th>{lang_mensagem}</th><th>{lang_email}</th><th>{lang_ip}</th>
                        </tr>
                    </thead>
                    <tbody>
                        {contatos}
                        <tr>
                            <td style="background-color:#F6F6F6;">{data}<button class="{lida_icon} icon small" id="{id}">Marcar</button></td>
                            <td>{nome}</td>
                            <td>{mensagem}</td>
                            <td class="c"><a href="mailto:{email}">{email}</a></td>
                            <td class="c"><a href="http://en.utrace.de/ip-address/189.123.114.221" rel="fancybox">{ip}</a></td>
                        </tr>
                        {/contatos}
                    </tbody>
                </table>
            </div>
        </section><!-- end div #content -->
        <footer>
            {include_footer_view}
        </footer>
    </body>
</html>